package com.sicheng.lc.lc笔试.京东篇;

import java.util.Scanner;

public class 前K个调大写后面的调成小写 {

    public static void main(String[] args) {
        // write your code here

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();

        String s = sc.next();

        for (int i = 0; i < n; i++) {
            char t = s.charAt(i);
            if (i < k && t <= 'z' && t >= 'a') {
                t = (char) (t - 32);
            } else if (i >= k && t >= 'A' && t <= 'Z') {
                t = (char) (t + 32);
            }
            System.out.print(t);
        }

    }
}
